#!/bin/bash
#
# A simple script that will recursively parse and lint any file that it finds.
# If you're ever having weird issues with Munki clients not picking up changes
# or reporting strange errors, run this script to make sure you don't have a
# broken plist somewhere in your repo.
#
# USAGE:
# ./plistLint.sh
#
# (that's it - no args)
#
baseDir=`dirname "${0}"`

for file in `find "${baseDir}/../pkgsinfo/"`
do
	if [ -f "${file}" ]
	then
		plutil -lint "${file}" | grep -ve ": OK"
	fi
done
